package com.asc {

/**
 * This class is used to impose an ordering on a collection of items, subject
 * to the following constraints:
 * <ul>
 *   <li>
 *     compare(a, b) == 0 iff compare(b, a) == 0
 *   </li>
 *   <li>
 *     if compare(a, b) <= 0 and compare(b, c) <= 0 than compare (a, c) <= 0
 *   </li>
 *   <li>
 *     compare(a, b) = -compare(b, a)
 *   </li>
 * </ul>
 *
 */
public interface Comparator {

  /**
   * Compare two items.
   * @param first
   * @param second
   * @return 
   */
  function compare(first:*, second:*) : int;
}
}